package com.atguigu.bean;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author : zjj
 * @date : 2021/9/24 9:48
 */
public class Dog  {

    public void Dog(){
        System.out.println("创建对象");
    }
    @PostConstruct
    public void init(){
        System.out.println("在构造器执行之后调用");
    }

    @PreDestroy
    public void destroy(){
        System.out.println("在容器关闭，移除对象之前");
    }
}
